package com.dkd.manage.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.dkd.common.annotation.Excel;
import com.dkd.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 合作商管理对象 tb_partner
 * 
 * @author ruruihan
 * @date 2025-10-31
 */
@TableName("tb_partner")
@Data
@EqualsAndHashCode(callSuper = false)
public class Partner extends BaseEntity
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 合作商名称 */
    @Excel(name = "合作商名称")
    private String partnerName;

    /** 联系人 */
    @Excel(name = "联系人")
    private String contactPerson;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String contactPhone;

    /** 分成比例（整数，如30表示30%） */
    @Excel(name = "分成比例", readConverterExp = "整=数，如30表示30%")
    private Long profitRatio;

    /** 账号 */
    @Excel(name = "账号")
    private String account;

    /** 密码（建议存储加密后字符串） */
    private String password;
    @TableField(exist = true)
    private Date createTime;
    @TableField(exist = true)
    private Date updateTime;
    @TableField(exist = true)
    private String createBy;
    @TableField(exist = true)
    private String updateBy;
    @TableField(exist = true)
    private String remark;
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("partnerName", getPartnerName())
            .append("contactPerson", getContactPerson())
            .append("contactPhone", getContactPhone())
            .append("profitRatio", getProfitRatio())
            .append("account", getAccount())
            .append("password", getPassword())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .toString();
    }
}
